import { Suspense } from "react";
import { createRoot } from "react-dom/client";
import { RouterProvider } from "react-router-dom";
import router from "@/router";

import { ConfigProvider } from "antd-mobile";
import zhCN from "antd-mobile/es/locales/zh-CN";
import Skelet from "@/components/skelet";

import "@/styles/index.less";
import "./index.less";

createRoot(document.getElementById("root")).render(
  <ConfigProvider locale={zhCN}>
    <Suspense fallback={<Skelet />}>
      <RouterProvider router={router} basename="/" />
    </Suspense>
  </ConfigProvider>
);
